<template>
  <el-button class="mc-redirect-button" v-bind="$attrs" v-on="$listeners" @click="go"><slot></slot></el-button>
</template>

<script>
export default {
  name: 'mc-redirect-button',
  data () {
    return {

    }
  },
  props: ['href','target'],
  mounted () {

  },
  methods:{
    go:function(){
      if(!window.iframeUi){
        if(this.href){
          if(this.target){
            window.open(this.href,"_blank")
          }else{
            window.location.href=this.href;
          }
        }
      }

    }
  }
}
</script>

<style lang="scss">
.mc-redirect-button:active{
  background-color:#d9dfef;
}
</style>
